package com.zhongfl.crm.model.boss;

import com.zhongfl.crm.enums.boss.WorkOrderStatus;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Description: 根据工单状态进行统计结果
 * @Author: Mawenlei
 * @Date: 2018/5/13/013 10:22
 */
public class WorkOrderStatusStatisticsResult implements Serializable {

    //private static final long serialVersionUID = 8400051024537119608L;

    @Setter
    @Getter
    private WorkOrderStatus status;

    private String statusName;

    public String getStatusName() {
        if (Objects.nonNull(status)) {
            return status.getKey();
        }
        return StringUtils.EMPTY;
    }

    @Setter
    @Getter
    private Integer count;

    public WorkOrderStatusStatisticsResult() {

    }

    public WorkOrderStatusStatisticsResult(WorkOrderStatus status, Integer count) {
        this.status = status;
        this.count = count;
    }
}
